package cn.gxa.j229.bug.finance.service.loanuser.impl;

import cn.gxa.j229.bug.finance.mapper.MoneyRecordMapper;
import cn.gxa.j229.bug.finance.pojo.MoneyRecord;
import cn.gxa.j229.bug.finance.service.loanuser.MoneyRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author: fenglin
 * @Date:2020/9/28 14:19
 * @Version 1.0
 */
@Service("MoneyRecordService")
public class MoneyRecordServiceImpl implements MoneyRecordService {
    @Resource
    MoneyRecordMapper moneyRecordMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(MoneyRecord record) {
        return 0;
    }

    @Override
    public int insertSelective(MoneyRecord record) {
        return 0;
    }

    @Override
    public List<Map<String, String>> selectAll(MoneyRecord moneyRecord) {
        moneyRecord.setPage((moneyRecord.getPage()-1)*moneyRecord.getLimit());
        return moneyRecordMapper.selectAll(moneyRecord);
    }

    @Override
    public List<Map<String, String>> selectKey(MoneyRecord moneyRecord) {
        moneyRecord.setPage((moneyRecord.getPage()-1)*moneyRecord.getLimit());
        return moneyRecordMapper.selectKey(moneyRecord);
    }

    @Override
    public int selectAllCount(MoneyRecord moneyRecord) {
        return moneyRecordMapper.selectAllCount(moneyRecord);
    }

    @Override
    public int selectKeyCount(MoneyRecord moneyRecord) {
        return moneyRecordMapper.selectKeyCount(moneyRecord);
    }

    @Override
    public MoneyRecord selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(MoneyRecord record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(MoneyRecord record) {
        return 0;
    }
}
